package com.itjeffrey.autocode.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.itjeffrey.autocode.bo.RoleInfoTbBO;
import com.itjeffrey.autocode.bo.req.IsEnableBO;
import com.itjeffrey.autocode.common.Result;
import com.itjeffrey.autocode.entity.RoleInfoTbEntity;
import com.itjeffrey.autocode.entity.RoleResEntity;
import com.itjeffrey.autocode.entity.UserRoleEntity;

import java.util.List;

/**
 * 服务接口
 * @author: admin
 * @date: 2021-03-28 12:26:46
 */
public interface RoleInfoTbService extends IService<RoleInfoTbEntity> {

    Result add(RoleInfoTbBO roleInfoTbBO);

    Result mod(RoleInfoTbBO roleInfoTbBO);

    Result delete(String id);

    Result queryList(RoleInfoTbBO roleInfoTbBO);

    List<RoleInfoTbEntity> queryRoleInfosByUsername(String username);

    void addUserRole(UserRoleEntity userRoleEntity);

    void addResRole(RoleResEntity roleResEntity);

    Result isEnableRole(IsEnableBO isEnableBO);

    Result queryOne(Integer roleId);

    Result queryRolesOutOfSelfRole(RoleInfoTbBO roleInfoTbBO);

    Result<List<RoleInfoTbEntity>> queryRoleInfosByLoginName(String loginName);
}